3.198 \(\int \frac {(1-a^2 x^2)^2 \tanh ^{-1}(a x)}{x^2} \, dx\)

Optimal. Leaf size=64 \[ \frac {1}{3} a^4 x^3 \tanh ^{-1}(a x)+\frac {a^3 x^2}{6}-\frac {4}{3} a \log \left (1-a^2 x^2\right )-2 a^2 x \tanh ^{-1}(a x)+a \log (x)-\frac {\tanh ^{-1}(a x)}{x} \]

[Out]

1/6*a^3*x^2-arctanh(a*x)/x-2*a^2*x*arctanh(a*x)+1/3*a^4*x^3*arctanh(a*x)+a*ln(x)-4/3*a*ln(-a^2*x^2+1)

________________________________________________________________________________________

Rubi [A]  time = 0.11, antiderivative size = 64, normalized size of antiderivative = 1.00, number of steps used = 13, number of rules used = 9, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.450, Rules used = {6012, 5910, 260, 5916, 266, 36, 29, 31, 43} \[ \frac {a^3 x^2}{6}-\frac {4}{3} a \log \left (1-a^2 x^2\right )+\frac {1}{3} a^4 x^3 \tanh ^{-1}(a x)-2 a^2 x \tanh ^{-1}(a x)+a \log (x)-\frac {\tanh ^{-1}(a x)}{x} \]

Antiderivative was successfully verified.

[In]

Int[((1 - a^2*x^2)^2*ArcTanh[a*x])/x^2,x]

[Out]

(a^3*x^2)/6 - ArcTanh[a*x]/x - 2*a^2*x*ArcTanh[a*x] + (a^4*x^3*ArcTanh[a*x])/3 + a*Log[x] - (4*a*Log[1 - a^2*x
^2])/3

Rule 29

Int[(x_)^(-1), x_Symbol] :> Simp[Log[x], x]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 36

Int[1/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Dist[b/(b*c - a*d), Int[1/(a + b*x), x], x] -
Dist[d/(b*c - a*d), Int[1/(c + d*x), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0]

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 260

Int[(x_)^(m_.)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Simp[Log[RemoveContent[a + b*x^n, x]]/(b*n), x] /; FreeQ
[{a, b, m, n}, x] && EqQ[m, n - 1]

Rule 266

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a
+ b*x)^p, x], x, x^n], x] /; FreeQ[{a, b, m, n, p}, x] && IntegerQ[Simplify[(m + 1)/n]]

Rule 5910

Int[((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))^(p_.), x_Symbol] :> Simp[x*(a + b*ArcTanh[c*x])^p, x] - Dist[b*c*p, In
t[(x*(a + b*ArcTanh[c*x])^(p - 1))/(1 - c^2*x^2), x], x] /; FreeQ[{a, b, c}, x] && IGtQ[p, 0]

Rule 5916

Int[((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))^(p_.)*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[((d*x)^(m + 1)*(a + b*ArcT
anh[c*x])^p)/(d*(m + 1)), x] - Dist[(b*c*p)/(d*(m + 1)), Int[((d*x)^(m + 1)*(a + b*ArcTanh[c*x])^(p - 1))/(1 -
 c^2*x^2), x], x] /; FreeQ[{a, b, c, d, m}, x] && IGtQ[p, 0] && (EqQ[p, 1] || IntegerQ[m]) && NeQ[m, -1]

Rule 6012

Int[((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))^(p_.)*((f_.)*(x_))^(m_)*((d_) + (e_.)*(x_)^2)^(q_), x_Symbol] :> Int[E
xpandIntegrand[(f*x)^m*(d + e*x^2)^q*(a + b*ArcTanh[c*x])^p, x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && EqQ[
c^2*d + e, 0] && IGtQ[p, 0] && IGtQ[q, 1]

Rubi steps

\begin {align*} \int \frac {\left (1-a^2 x^2\right )^2 \tanh ^{-1}(a x)}{x^2} \, dx &=\int \left (-2 a^2 \tanh ^{-1}(a x)+\frac {\tanh ^{-1}(a x)}{x^2}+a^4 x^2 \tanh ^{-1}(a x)\right ) \, dx\\ &=-\left (\left (2 a^2\right ) \int \tanh ^{-1}(a x) \, dx\right )+a^4 \int x^2 \tanh ^{-1}(a x) \, dx+\int \frac {\tanh ^{-1}(a x)}{x^2} \, dx\\ &=-\frac {\tanh ^{-1}(a x)}{x}-2 a^2 x \tanh ^{-1}(a x)+\frac {1}{3} a^4 x^3 \tanh ^{-1}(a x)+a \int \frac {1}{x \left (1-a^2 x^2\right )} \, dx+\left (2 a^3\right ) \int \frac {x}{1-a^2 x^2} \, dx-\frac {1}{3} a^5 \int \frac {x^3}{1-a^2 x^2} \, dx\\ &=-\frac {\tanh ^{-1}(a x)}{x}-2 a^2 x \tanh ^{-1}(a x)+\frac {1}{3} a^4 x^3 \tanh ^{-1}(a x)-a \log \left (1-a^2 x^2\right )+\frac {1}{2} a \operatorname {Subst}\left (\int \frac {1}{x \left (1-a^2 x\right )} \, dx,x,x^2\right )-\frac {1}{6} a^5 \operatorname {Subst}\left (\int \frac {x}{1-a^2 x} \, dx,x,x^2\right )\\ &=-\frac {\tanh ^{-1}(a x)}{x}-2 a^2 x \tanh ^{-1}(a x)+\frac {1}{3} a^4 x^3 \tanh ^{-1}(a x)-a \log \left (1-a^2 x^2\right )+\frac {1}{2} a \operatorname {Subst}\left (\int \frac {1}{x} \, dx,x,x^2\right )+\frac {1}{2} a^3 \operatorname {Subst}\left (\int \frac {1}{1-a^2 x} \, dx,x,x^2\right )-\frac {1}{6} a^5 \operatorname {Subst}\left (\int \left (-\frac {1}{a^2}-\frac {1}{a^2 \left (-1+a^2 x\right )}\right ) \, dx,x,x^2\right )\\ &=\frac {a^3 x^2}{6}-\frac {\tanh ^{-1}(a x)}{x}-2 a^2 x \tanh ^{-1}(a x)+\frac {1}{3} a^4 x^3 \tanh ^{-1}(a x)+a \log (x)-\frac {4}{3} a \log \left (1-a^2 x^2\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.02, size = 64, normalized size = 1.00 \[ \frac {1}{3} a^4 x^3 \tanh ^{-1}(a x)+\frac {a^3 x^2}{6}-\frac {4}{3} a \log \left (1-a^2 x^2\right )-2 a^2 x \tanh ^{-1}(a x)+a \log (x)-\frac {\tanh ^{-1}(a x)}{x} \]

Antiderivative was successfully verified.

[In]

Integrate[((1 - a^2*x^2)^2*ArcTanh[a*x])/x^2,x]

[Out]

(a^3*x^2)/6 - ArcTanh[a*x]/x - 2*a^2*x*ArcTanh[a*x] + (a^4*x^3*ArcTanh[a*x])/3 + a*Log[x] - (4*a*Log[1 - a^2*x
^2])/3

________________________________________________________________________________________

fricas [A]  time = 0.53, size = 66, normalized size = 1.03 \[ \frac {a^{3} x^{3} - 8 \, a x \log \left (a^{2} x^{2} - 1\right ) + 6 \, a x \log \relax (x) + {\left (a^{4} x^{4} - 6 \, a^{2} x^{2} - 3\right )} \log \left (-\frac {a x + 1}{a x - 1}\right )}{6 \, x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-a^2*x^2+1)^2*arctanh(a*x)/x^2,x, algorithm="fricas")

[Out]

1/6*(a^3*x^3 - 8*a*x*log(a^2*x^2 - 1) + 6*a*x*log(x) + (a^4*x^4 - 6*a^2*x^2 - 3)*log(-(a*x + 1)/(a*x - 1)))/x

________________________________________________________________________________________

giac [B]  time = 0.26, size = 249, normalized size = 3.89 \[ \frac {1}{3} \, {\left ({\left (\frac {3}{\frac {a x + 1}{a x - 1} + 1} - \frac {\frac {3 \, {\left (a x + 1\right )}^{2}}{{\left (a x - 1\right )}^{2}} - \frac {12 \, {\left (a x + 1\right )}}{a x - 1} + 5}{{\left (\frac {a x + 1}{a x - 1} - 1\right )}^{3}}\right )} \log \left (-\frac {\frac {a {\left (\frac {a x + 1}{a x - 1} + 1\right )}}{\frac {{\left (a x + 1\right )} a}{a x - 1} - a} + 1}{\frac {a {\left (\frac {a x + 1}{a x - 1} + 1\right )}}{\frac {{\left (a x + 1\right )} a}{a x - 1} - a} - 1}\right ) + \frac {2 \, {\left (a x + 1\right )}}{{\left (a x - 1\right )} {\left (\frac {a x + 1}{a x - 1} - 1\right )}^{2}} - 8 \, \log \left (\frac {{\left | -a x - 1 \right |}}{{\left | a x - 1 \right |}}\right ) + 5 \, \log \left ({\left | -\frac {a x + 1}{a x - 1} + 1 \right |}\right ) + 3 \, \log \left ({\left | -\frac {a x + 1}{a x - 1} - 1 \right |}\right )\right )} a \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-a^2*x^2+1)^2*arctanh(a*x)/x^2,x, algorithm="giac")

[Out]

1/3*((3/((a*x + 1)/(a*x - 1) + 1) - (3*(a*x + 1)^2/(a*x - 1)^2 - 12*(a*x + 1)/(a*x - 1) + 5)/((a*x + 1)/(a*x -
 1) - 1)^3)*log(-(a*((a*x + 1)/(a*x - 1) + 1)/((a*x + 1)*a/(a*x - 1) - a) + 1)/(a*((a*x + 1)/(a*x - 1) + 1)/((
a*x + 1)*a/(a*x - 1) - a) - 1)) + 2*(a*x + 1)/((a*x - 1)*((a*x + 1)/(a*x - 1) - 1)^2) - 8*log(abs(-a*x - 1)/ab
s(a*x - 1)) + 5*log(abs(-(a*x + 1)/(a*x - 1) + 1)) + 3*log(abs(-(a*x + 1)/(a*x - 1) - 1)))*a

________________________________________________________________________________________

maple [A]  time = 0.04, size = 65, normalized size = 1.02 \[ \frac {a^{4} x^{3} \arctanh \left (a x \right )}{3}-2 a^{2} x \arctanh \left (a x \right )-\frac {\arctanh \left (a x \right )}{x}+\frac {x^{2} a^{3}}{6}+a \ln \left (a x \right )-\frac {4 a \ln \left (a x -1\right )}{3}-\frac {4 a \ln \left (a x +1\right )}{3} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((-a^2*x^2+1)^2*arctanh(a*x)/x^2,x)

[Out]

1/3*a^4*x^3*arctanh(a*x)-2*a^2*x*arctanh(a*x)-arctanh(a*x)/x+1/6*x^2*a^3+a*ln(a*x)-4/3*a*ln(a*x-1)-4/3*a*ln(a*
x+1)

________________________________________________________________________________________

maxima [A]  time = 0.31, size = 57, normalized size = 0.89 \[ \frac {1}{6} \, {\left (a^{2} x^{2} - 8 \, \log \left (a x + 1\right ) - 8 \, \log \left (a x - 1\right ) + 6 \, \log \relax (x)\right )} a + \frac {1}{3} \, {\left (a^{4} x^{3} - 6 \, a^{2} x - \frac {3}{x}\right )} \operatorname {artanh}\left (a x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-a^2*x^2+1)^2*arctanh(a*x)/x^2,x, algorithm="maxima")

[Out]

1/6*(a^2*x^2 - 8*log(a*x + 1) - 8*log(a*x - 1) + 6*log(x))*a + 1/3*(a^4*x^3 - 6*a^2*x - 3/x)*arctanh(a*x)

________________________________________________________________________________________

mupad [B]  time = 0.91, size = 57, normalized size = 0.89 \[ a\,\ln \relax (x)-\frac {4\,a\,\ln \left (a^2\,x^2-1\right )}{3}-\frac {\mathrm {atanh}\left (a\,x\right )}{x}+\frac {a^3\,x^2}{6}-2\,a^2\,x\,\mathrm {atanh}\left (a\,x\right )+\frac {a^4\,x^3\,\mathrm {atanh}\left (a\,x\right )}{3} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((atanh(a*x)*(a^2*x^2 - 1)^2)/x^2,x)

[Out]

a*log(x) - (4*a*log(a^2*x^2 - 1))/3 - atanh(a*x)/x + (a^3*x^2)/6 - 2*a^2*x*atanh(a*x) + (a^4*x^3*atanh(a*x))/3

________________________________________________________________________________________

sympy [A]  time = 1.50, size = 68, normalized size = 1.06 \[ \begin {cases} \frac {a^{4} x^{3} \operatorname {atanh}{\left (a x \right )}}{3} + \frac {a^{3} x^{2}}{6} - 2 a^{2} x \operatorname {atanh}{\left (a x \right )} + a \log {\relax (x )} - \frac {8 a \log {\left (x - \frac {1}{a} \right )}}{3} - \frac {8 a \operatorname {atanh}{\left (a x \right )}}{3} - \frac {\operatorname {atanh}{\left (a x \right )}}{x} & \text {for}\: a \neq 0 \\0 & \text {otherwise} \end {cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-a**2*x**2+1)**2*atanh(a*x)/x**2,x)

[Out]

Piecewise((a**4*x**3*atanh(a*x)/3 + a**3*x**2/6 - 2*a**2*x*atanh(a*x) + a*log(x) - 8*a*log(x - 1/a)/3 - 8*a*at
anh(a*x)/3 - atanh(a*x)/x, Ne(a, 0)), (0, True))

________________________________________________________________________________________